1. Field of the Invention
This invention pertains to the metering or the utilizing of metered information pertaining to irregular, almost periodic electrical waveforms with currents and voltage outside normal ranges.
2. Description of the Prior Art
Regular electrical waveforms are routinely metered and the results of effectively measuring their parameters are routinely utilized in electrical devices and circuits of all manner of description. One of the most common of all waveforms is the sine wave. This waveform is regularly periodic and occurs naturally in numerous applications. Another regular waveform is the so-called "square wave" waveform. This waveform ascends to a stable positive value for a period of time and then changes substantially instantaneously to a like negative value for the same period of time. This pattern is repeated periodically. Both of these waveforms are "regular" in as much as the shape of the negative wave is the same as the positive wave albeit inverted. A regular pulse repeated with no interruptions is recognized as periodic. As used herein, the expression "periodic" waveforms refers to regularly repeated waveforms having no segments of zero amplitude. Thus, an interrupted sine wave would be deemed regular and almost periodic.
Electrical waveforms are associated with both the voltage condition and current condition of a given output. The periodicity of such voltage or current waveform is expressed in terms of its frequency. Voltage measurements are generally made in volts; current measurements are generally made in amperes and frequency measurements are generally made in cycles per second or pulses per second, often abbreviated "Hertz".
A "voltage" measurement, however, does not completely define which voltage measurement is being taken, there being at least three common voltage measurements made of regular waveforms, namely, "peak voltage", "average voltage" and root mean square or "rms" voltage. The same is true for current measurements. Instruments are available for making measurements of these aspects of many periodic electrical waveforms. In many cases, the actual display of measurements is not so much of interest as the effective determination of the measurement for use in performing a circuit function, for instance, determining an average voltage level that is then subsequently utilized as a feedback voltage.
If a waveform is not regular, that is, the shapes of the positive and negative wave components are different but are measured with apparatus designed for measuring regular waveforms, the measurement that is returned is adjusted by the apparatus to seem regular. That is, by looking at the measurement, a person would see a value that the irregular waveform would make on apparatus designed for measuring a regular waveform. In many applications this is undesirable since the results are incorrect and misleading.
One use where regular measuring apparatus is not sufficient or desirable for measuring or utilizing the parameters of an "irregular" waveform, is apparatus used in conjunction with transcranially stimulating a subject in accordance with the procedures described in U.S. Pat. No. 4,646,744, "Method and Treatment With Transcranially Applied Electrical Signals", Ifor D. Capel, issued Mar. 3, 1987 and U.S. patent application Ser. No. 874,451, "Method and Apparatus for Delivering a Prescriptive Electrical Signal", Malcolm H. Skolnick, filed June 16, 1986, which patent and application are incorporated herein by reference for all purposes. Such application illustrates an important feature of the invention, namely the ability to derive accurate measurements of the electrical waveform when it is applied across a complex impedance such as the human cranium combining elements of resistance, capacitance and inductance.
The general shape of one example of the voltage and current waveforms employed in the technique of the application above identified is generally, as follows. A pulse of the waveform advances almost instantaneously from a zero voltage level to a relatively high positive value and stays at that value for a relatively short period of time. Then the value drops to a relatively small negative value, where it stays for a relatively long period of time. Then the value becomes zero for a moderate amount of time. Then the next pulse begins with a relatively high positive value as with the first pulse. Ideally, the area under the positive envelope portion of the pulse equals the area under the negative envelope portion. (Hence, it will be seen that the "average" value of such a pulse is zero when determined by conventional means.) Alternatively to the example just described, a voltage or current waveform pulse alternates between a relatively large negative value of short duration and a relatively small positive value of long duration. In either event, the pulses occur at regular intervals.
It may be desirable in some cases to evaluate or measure only the positive portion of the waveform or only the negative portion, or to evaluate or measure only that portion of the waveform that might be dominant over the other. For example, if the negative portion of the waveform has a larger absolute amplitude than the absolute amplitude of the positive portion of the waveform for a period of time that then shifts to the alternate state after awhile, it may be desirable to detect the larger, i.e., the negative amplitude portion in the above example, and evaluate or measure it until such time that the positive portion has the dominant amplitude, and then evaluate or measure it. None of these desirable evaluations or measurements can be made using conventional techniques.
One technique that is used in the art for analyzing an ac waveform, i.e., one that alternates between a positive value and negative value or which varies in amplitude around a base value that may not be zero, is to first digitize the ac waveform. This is done by amplitude sampling the ac waveform at regular intervals, there being many samples per cycle of the ac waveform. Then the positive samples can be treated separately from the negative samples, or some other disposition can be made of the sampled values. Achieving accuracy in the technique of segmenting or sampling, of course, is only possible when the frequency of the ac waveform is relatively low so that a large number of samples can be made each cycle for digitizing purposes.
It is therefore a feature of the present invention to provide an improved method of determining the average value of one part of a repetitive irregular waveform that could be relatively high frequency without digitizing in accordance with prior art procedures.
It is another feature of the present invention to provide an improved method of determining the average value of one part of a repetitive irregular waveform by sampling at a rate different from the rate of the repetitive irregular waveform.
It is still another feature of the present invention to provide an improved method of measuring the frequency of a set of irregular pulses having a regularity in transition occurrences by sensing and counting a predetermined number of transitions of the irregular pulses, counting a number of regular-interval measurement pulses that occur during the time that said predetermined number of transitions of the irregular pulses occurs, determining the overall period of the counted regular pulses and hence the overall period of the counted transitions of the irregular pulses, and calculating the frequency of the irregular pulses by taking the reciprocal of the period for a complete cycle, i.e., the time duration between three transition occurrences.